package com.workcell.workdata.im.model.vo;

import com.workcell.workdata.im.entity.GroupRobot;

import java.util.Date;

public class GroupRobotVO {

    private Long id;

    private Long uid;

    private Long groupId;

    private String uuid;

    private String name;

    private String webhook;

    private Byte state;

    private Date createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWebhook() {
        return webhook;
    }

    public void setWebhook(String webhook) {
        this.webhook = webhook;
    }

    public Byte getState() {
        return state;
    }

    public void setState(Byte state) {
        this.state = state;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public static GroupRobotVO of(GroupRobot robot){

        if (robot == null){
            return null;
        }

        GroupRobotVO vo = new GroupRobotVO();
        vo.setGroupId(robot.getGroupId());
        vo.setState(robot.getState());
        vo.setUid(robot.getUid());
        vo.setName(robot.getName());
        vo.setId(robot.getId());
        vo.setWebhook(robot.getWebhook());
        vo.setUuid(robot.getUuid());
        vo.setCreateTime(robot.getCreateTime());
        return vo;
    }
}
